//
//  WWNotificationCenter.h
//  通知学习
//
//  Created by slience on 2019/10/14.
//  Copyright © 2019 shehuiren. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WWNotification.h"
NS_ASSUME_NONNULL_BEGIN

@interface WWNotificationCenter : NSObject

+(WWNotificationCenter *)defaultCenter;

-(void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSString *)aName object:(nullable)anObject;

-(void)postNotification:(WWNotification *)notification;

- (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject;

@end


/*-------------------*/

typedef void  (^OperationBlock)();
@interface WWObserverModel : NSObject

@property (nonatomic,strong)id observer;

@property (nonatomic,assign) SEL selector;

@property (nonatomic,copy,nonnull) NSString * notifiaionName;

@property (nonatomic,strong)id objcet;

@property (nonatomic,strong)NSOperationQueue * operationQueue;

@property (nonatomic,copy) OperationBlock block;

@end

NS_ASSUME_NONNULL_END
